/*
 * Miya.com Inc.
 * Copyright (c) 2004-2018 All Rights Reserved.
 */
package com.miya.erpmofa.common.lang.result;

import com.miya.erpmofa.common.lang.enums.ErrorCodeEnum;

/**
 * @author ${zhaowei}
 * @version $Id: ResultUtil.java, v 0.1 2018年08月08日 14:39 ${zhaowei} Exp $
 */
public class ResultUtil {

    public static Result invalidParamResult(String paramName){
        Result result = new Result();
        result.setSuccess(false);
        result.setErr_code(ErrorCodeEnum.PARAMETER_VERIFY_FAIL.getCode());
        result.setErr_msg(ErrorCodeEnum.PARAMETER_VERIFY_FAIL.getChineseName()+" "+paramName);
        return result;
    }
    public static Result apiIdNotExist(){
        Result result = new Result();
        result.setSuccess(false);
        result.setErr_code(ErrorCodeEnum.APP_ID_NOT_EXIST.getCode());
        result.setErr_msg(ErrorCodeEnum.APP_ID_NOT_EXIST.getChineseName());
        return result;
    }
}